﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Directory.Model
{
	public class MessageInfo
	{
		private int _id;
		private string _title = string.Empty;
		private string _author = string.Empty;
		private string _content = string.Empty;
		private string _authorIP = string.Empty;
		private DateTime _releaseDate;
		private string _checker;
		private string _reply = string.Empty;
		private DateTime _replyDate;
		private bool _isChecked;
		private int _topState;

		public MessageInfo(string titile, string author, string content, string authorIp, DateTime releaseDate)
			: this(titile, author, content, authorIp, releaseDate, false, 0) { }

		public MessageInfo(string title, string author, string content, string authorIp, DateTime releaseDate, bool isChecked, int topState)
			: this(0, title, author, content, authorIp, releaseDate, null, null, DateTime.MinValue, isChecked, topState) { }

		public MessageInfo(int Id, string title, string author, string content, string authorIp, DateTime releaseDate,
			string checker, string reply, DateTime replyDate, bool isChecked, int topState)
		{
			_id = Id;
			_title = title;
			_author = author;
			_content = content;
			_authorIP = authorIp;
			_releaseDate = releaseDate;
			_checker = checker;
			_reply = reply;
			_replyDate = replyDate;
			_isChecked = isChecked;
			_topState = topState;
		}

		public int ID
		{
			get
			{
				return _id;
			}
			set
			{
				_id = value;
			}
		}

		public string Title
		{
			get
			{
				return _title;
			}
			set
			{
				_title = value;
			}
		}

		public string Author
		{
			get
			{
				return _author;
			}
		}

		public string Content
		{
			get
			{
				return _content;
			}
			set
			{
				_content = value;
			}
		}

		public string AuthorIP
		{
			get
			{
				return _authorIP;
			}
		}

		public DateTime ReleaseDate
		{
			get
			{
				return _releaseDate;
			}
		}

		public string Checker
		{
			get
			{
				return _checker;
			}
		}

		public string Reply
		{
			get
			{
				return _reply;
			}
			set
			{
				_reply = value;
			}
		}

		public DateTime ReplyDate
		{
			get
			{
				return _replyDate;
			}
		}

		public bool IsChecked
		{
			get
			{
				return _isChecked; ;
			}
		}

		public int TopState
		{
			get
			{
				return _topState;
			}
			set
			{
				_topState = value;
			}
		}
	}
}
